package com.allwees.bs.c.module.user.dao;

import com.allwees.bs.c.module.user.entity.DeviceEntity;
import com.allwees.core.dao.mybatis.dao.BaseDao;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface DeviceDao extends BaseDao<DeviceEntity> {
    @Select({"SELECT jpush_id FROM usr_device s WHERE s.user_uuid = #{userUuid}"})
    String getPushId(@Param("userUuid") String userUuid);

    @Select({"SELECT * FROM usr_device s WHERE s.user_uuid = #{userUuid}"})
    List<DeviceEntity> findAllByUserUuid(String userUuid);
}
